package cn.demoncat.util.lang.entity;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Objects;

/**
 * 描述：{字符串类型id,arr}键值对类型的实体类
 *
 * @author yxl
 *
 * @version 2.0
 *
 * @since 2016-12-9
 */
public class SidArr implements Serializable {

	private static final long serialVersionUID = 1L;

	private String id;
	private String[] arr;

	public SidArr() {
		super();
	}

	public SidArr(String id, String[] arr) {
		super();
		this.id = id;
		this.arr = arr;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String[] getArr() {
		return arr;
	}

	public void setArr(String[] arr) {
		this.arr = arr;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		SidArr sidArr = (SidArr) o;
		return Objects.equals(id, sidArr.id) &&
				Arrays.equals(arr, sidArr.arr);
	}

	@Override
	public int hashCode() {
		int result = Objects.hash(id);
		result = 31 * result + Arrays.hashCode(arr);
		return result;
	}

	@Override
	public String toString() {
		return "SidArr [id=" + id + ", arr=" + Arrays.toString(arr) + "]";
	}


}
